home *** CD-ROM | disk | FTP | other *** search
/ Interactive Web Graphics with Shout 3D / Interactive Web Graphics With Shout 3D.iso / mac / Code / Chapter09 / twosegments.s3d < prev    next >
Text File  |  2000-08-27  |  769b  |  45 lines

  1.  
  2. DEF Box01 Transform {
  3.   children [ 
  4.     Shape {
  5.       appearance   Appearance {
  6.      material   Material {
  7.        diffuseColor   0.898 0.6039 0.8431
  8.      }
  9.       }
  10.    
  11.       geometry Box {
  12.       }
  13.     }
  14.   ] 
  15.   translation   0 0 0
  16. }
  17.  
  18. DEF timer TimeSensor {
  19.   startTime -1
  20.   cycleInterval   10
  21.   loop TRUE
  22. }
  23.  
  24. DEF si ScalarInterpolator {
  25.   key   [ 0, 1 ]
  26.   keyValue   [ 0, 0.4 ]
  27. }
  28.  
  29. DEF Box01-POS-INTERP PositionInterpolator {
  30.   key   [ 0, .19, .20, 1 ]
  31.   keyValue [
  32.         #horizontal
  33.         0 0 0,
  34.         5 0 0,
  35.       
  36.         #vertical
  37.         0 0 0,
  38.         0 4 0 ]
  39.  }
  40.  
  41.  
  42. ROUTE timer.fraction_changed TO si.set_fraction
  43. ROUTE si.value_changed TO Box01-POS-INTERP.set_fraction
  44. ROUTE Box01-POS-INTERP.value_changed TO Box01.set_translation
  45.